
package com.x52im.mall;

import android.app.Activity;

import com.eva.android.MemoryCacheProvider;
import com.eva.epc.common.dto.IdName;

/**
 * 客户端数据缓存支持类.
 * 
 * @author Jack Jiang(http://www.52im.net/space-uid-1.html)
 * @version 1.0
 */
public class MemoryCacheProvider_forMall extends MemoryCacheProvider
{
	private static Activity activity = null;
	/**
	 * 获得本类的唯一实例(单例模式Singleton).
	 * 
	 * @return
	 */
	public static MemoryCacheProvider getInstance(Activity activity)
	{
		MemoryCacheProvider_forMall.activity = activity;
		if(singleInstance==null)
			singleInstance = new MemoryCacheProvider_forMall();
		return singleInstance;
	}
	
	/**
	 * 重写父类中的本方法，以实现Java桌面平台从服务端获取IdName数组.
	 * 
	 * @see FWUtils#queryIdNames(String, String, String, String)
	 */
	@Override 
	protected IdName[] queryIdNamesImpl(String table, String queryFieldNames, String where,String other)
	{
		return HttpServiceFactory4AImpl.AToolKits.queryIdNames(MallGlobal.getMallProviderInstance(MemoryCacheProvider_forMall.activity)
				.getRobotimeMall().getAuthedService(), table,queryFieldNames,where,other);
	}
}